package top.yxqz.resp;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author Mr.余
 * @date 2022/11/18
 * @package top.yxqz.resp
 */
@WebServlet("/demo4")
public class RespDemo4 extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//        设置setDateHeader消息头的相关内容
        long time = System.currentTimeMillis()+(1*60*60*1000);
        response.setDateHeader("Expires",time);
    }
}
